﻿@model DateTime?
@Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty))

<script language="javascript" type="text/javascript">
	$(document).ready(function () {
		$("#@ViewData.TemplateInfo.HtmlFieldPrefix.Replace(".", "_")").datepicker({
			changeMonth: true,
			changeYear: true,
			dateFormat: 'yy-mm-dd',
			buttonImage: '@Url.Content("/Content/images/calendar.gif")',
			showOn: "both",
			buttonImageOnly: true
		});
	});
</script>
